#include <iostream>
using namespace std;

signed main()
{
	int ans = 0;
	int n;
	cin>>n;
	while(n != 1){
		if(n%2==0){
			n /= 2;
		}
		else{
			n = (3*n+1)/2;
		}
		ans++;
	}
	cout<<ans;
	return 0;
}
